package com.wpre.logisticsservice.listener;

import com.wpre.orderservice.model.OrderInfo;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LianBao
 * Date: 2025-04-08
 * Time: 20:41
 */
@Component
//@RabbitListener(queues = "order.create")
public class OrderListener {

    //    @RabbitListener(queues = "order.create")
//    @RabbitHandler
    public void handMessage(String orderInfo) {
        System.out.println("接受到订单消息" + orderInfo);
    }

        @RabbitListener(queues = "order.create")
//    @RabbitHandler
    public void handMessage(OrderInfo orderInfo) {
        System.out.println("接受到订单消息" + orderInfo);
    }


}
